package com.neusoft.a132wxyorderingdish.model;

import com.neusoft.a132wxyorderingdish.common.Constants;
import com.neusoft.a132wxyorderingdish.listener.RetrofitListener;
import com.neusoft.a132wxyorderingdish.service.UserService;

import retrofit2.Call;


public class UserModel extends RetrofitBaseModel {
    private UserService userService;

    public UserModel(){
        super();
        this.userService=retrofit.create(UserService.class);
    }
    public void userLogin(String username, String password, final RetrofitListener listener){
        Call call=userService.userLogin(username,password);
        bindCallback(call,listener,Constants.USERLOGIN);
    }
    public void register(String username, String userpass,String mobilenum,String address,String comment,final RetrofitListener listener){
        Call call = userService.register(username,userpass,mobilenum,address,comment);
        bindCallback(call,listener,Constants.USEREGISTER);
    }
}

